package com.koron.order.overhaul.feign;

/**
 * @title: GradeFeign
 * @projectName GDH_EAM_V2
 * @description: TODO
 * @author twcao
 * @date 2021/10/1116:49
 */

import com.koron.bean.base.Response;
import com.koron.order.overhaul.bean.dto.GradeDTO;
import com.koron.order.overhaul.bean.dto.GradeQuery;
import com.koron.order.overhaul.feign.fallback.GradeFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "eam-service-standard", fallbackFactory = GradeFeignFallback.class)
public interface GradeFeign {

    @GetMapping("/grade")
    Response<GradeDTO> select(@RequestParam("id") String id);

    @GetMapping("/grade/list")
    Response<List<GradeDTO>> list(@SpringQueryMap GradeQuery query);
}
